<?php
class SelfNick implements iFilter
{
	public function applyFilter($echo)
	{	
		if($echo['nickname'] == $echo['selfnick'] && $echo['replyto'])
		{
			$echo['filter_output'] = 'ECHO_FROM_SELF';
		}
		else if ($echo['replyto'] == ">>" . $echo['selfnick'])
		{
			$echo['filter_output'] = 'ECHO_TO_SELF';
		}
		
		return $echo;
	}
}
?>